import React, { createContext, useState } from "react";
import TestUseContext from "./TestUseContext";
import { Button } from "antd";
import context from "@/context";
const { CountContext } = context;

export default function TestCreateContext() {
    const [count, setCount] = useState(0);
    return (
        <div>
            <Button onClick={() => setCount(count + 1)}>加一</Button>
            <CountContext.Provider value={count}>
                <TestUseContext />
            </CountContext.Provider>
        </div>
    );
}